<?php

namespace App\Listeners;

use App\Events\DistributionPosterEvent;
use App\Jobs\DistributionPosterJob;
use Illuminate\Support\Facades\Log;

class DistributionPosterListener
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * @param DistributionPosterEvent $event
     */
    public function handle(DistributionPosterEvent $event)
    {
        Log::info('触发分销海报生成');
        DistributionPosterJob::dispatch($event->user);
    }
}
